import 'dart:typed_data';

import 'package:flutter_test/flutter_test.dart';
import 'package:pos_link_print/pos_link_print.dart';
import 'package:pos_link_print/pos_link_print_platform_interface.dart';
import 'package:pos_link_print/pos_link_print_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockPosLinkPrintPlatform
    with MockPlatformInterfaceMixin
    implements PosLinkPrintPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<void> bigFont() {
    // TODO: implement bigFont
    throw UnimplementedError();
  }

  @override
  Future<void> centerAlign() {
    // TODO: implement centerAlign
    throw UnimplementedError();
  }

  @override
  Future<void> clear() {
    // TODO: implement clear
    throw UnimplementedError();
  }

  @override
  Future<void> content(String content) {
    // TODO: implement content
    throw UnimplementedError();
  }

  @override
  Future<void> date() {
    // TODO: implement date
    throw UnimplementedError();
  }

  @override
  Future<void> disclaimer() {
    // TODO: implement disclaimer
    throw UnimplementedError();
  }

  @override
  Future<void> header() {
    // TODO: implement header
    throw UnimplementedError();
  }

  @override
  Future<void> invert() {
    // TODO: implement invert
    throw UnimplementedError();
  }

  @override
  Future<void> leftAlign() {
    // TODO: implement leftAlign
    throw UnimplementedError();
  }

  @override
  Future<void> normalFont() {
    // TODO: implement normalFont
    throw UnimplementedError();
  }

  @override
  Future<void> print() {
    // TODO: implement print
    throw UnimplementedError();
  }

  @override
  Future<void> rightAlign() {
    // TODO: implement rightAlign
    throw UnimplementedError();
  }

  @override
  Future<void> smallFont() {
    // TODO: implement smallFont
    throw UnimplementedError();
  }

  @override
  Future<void> sn() {
    // TODO: implement sn
    throw UnimplementedError();
  }

  @override
  Future<void> time() {
    // TODO: implement time
    throw UnimplementedError();
  }

  @override
  Future<void> trailer() {
    // TODO: implement trailer
    throw UnimplementedError();
  }

  @override
  Future<void> barcode(int type, int blockSize, String content) {
    // TODO: implement barcode
    throw UnimplementedError();
  }

  @override
  Future<void> lineSeparator() {
    // TODO: implement lineSeparator
    throw UnimplementedError();
  }

  @override
  Future<void> printImg(Uint8List bytes, int location) {
    // TODO: implement printImg
    throw UnimplementedError();
  }

}

void main() {
  final PosLinkPrintPlatform initialPlatform = PosLinkPrintPlatform.instance;

  test('$MethodChannelPosLinkPrint is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelPosLinkPrint>());
  });

  test('getPlatformVersion', () async {
    PosLinkPrint posLinkPrintPlugin = PosLinkPrint();
    MockPosLinkPrintPlatform fakePlatform = MockPosLinkPrintPlatform();
    PosLinkPrintPlatform.instance = fakePlatform;

    expect(await posLinkPrintPlugin.getPlatformVersion(), '42');
  });
}
